<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:U($Think.ACTION_NAME)}" method="post">
        <input type="hidden" name="pageSize" value="{$Think.session.pageSize}">
        <input type="hidden" name="pageCurrent" value="{$Think.session.pageCurrent}">
        <input type="hidden" name="orderField" value="{$Think.session.orderField}">
        <input type="hidden" name="orderDirection" value="{$Think.session.orderDirection}">
        <input type="hidden" name="muid" value="{$search[muid]}">
        <div class="bjui-searchBar">
            <label>股票代码：</label><input type="text" name="code" value="{$search.code}" class="form-control" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>
        </div>
    </form>
</div>

<div class="bjui-pageContent">
    <!-- 内容区 -->
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
        <tr>
            <th>股票名称</th>
            <th>股票代码</th>
            <th>持仓总量</th>
            <th>买入均价</th>
            <th>可卖数量</th>
            <th>初次建仓时间</th>
            <th>清仓时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <volist name="data" id="vo">
            <tr>
            	<td>{$vo.codename}</td>
                <td>{$vo.code}</td>
                <td>{$vo.total}</td>
                <td><input type="text" id="price_{$vo.sid}" value="{$vo.price}" style="width:100px"></td>
                <td>{$vo.allow_total}</td>
                <td><empty name="vo['atime']">/<else/>{$vo.atime|date="Y-m-d H:i:s",###}</empty></td>
                <td><empty name="vo['ctime']">/<else/>{$vo.ctime|date="Y-m-d H:i:s",###}</empty></td>
                <td>
                    <button id="simed" class="btn-default" onclick="currposed('{$vo.sid}')">编辑</button>
                    <a href="{:U('Member/simtra',array('uid'=>$vo[muid],'code'=>$vo[code]))}" class="btn btn-default" data-toggle="navtab" data-id="sim" data-reload-warn="本页已有打开的内容，确定将刷新本页内容，是否继续？" data-title="{$vo.nickname}-交易列表" title="点击查看-{$vo.nickname}-交易列表">交易记录</a>
                </td>
            </tr>
        </volist>
    </table>
</div>
<script type="text/javascript">
	function currposed(obj) {
		$.getJSON("{:U(currposed)}", {
            prices: $("#price_"+obj).val(),
            sid: obj
        }, function(json) {
            if(json.message == 'ok') { alert('编辑成功');}else{ alert('编辑失败');}
        });
	}
</script>
<include file="./App/Common/View/Common/pageFooter.html" />